
class SMPPAPI D2Win : public Library<D2Win>
{
#ifdef SMPPLIBRARY_EXPORT
	static void SetFunctions();
public:
	static void Init()
	{
		Name = "D2Win.dll";
		Offset = LoadDiabloLibrary();
		SetFunctions();
	}
#endif
public:
	typedef void(__fastcall* TD2DrawText) (wchar_t* pString, int nXpos, int nYpos, int nColour, int nTransTbl);
	static TD2DrawText D2DrawText;
	typedef void(__fastcall* TD2SetEditBoxProc) (D2EditBox* box, BOOL(__stdcall* FunCallBack)(D2EditBox*, DWORD, DWORD));
	static TD2SetEditBoxProc D2SetEditBoxProc;
	typedef int(__fastcall* TD2SetEditBoxText) (D2EditBox* box, wchar_t* txt);
	static TD2SetEditBoxText D2SetEditBoxText;
	typedef int(__fastcall* TD2SelectEditBoxText) (D2EditBox* box);
	static TD2SelectEditBoxText D2SelectEditBoxText;
	typedef int(__fastcall* TD2SetFontSize) (int nFont);
	static TD2SetFontSize D2SetFontSize;
	typedef DWORD(__fastcall* TD2DrawUnk10199) (wchar_t* pString, DWORD u1, DWORD u2);
	static TD2DrawUnk10199 D2DrawUnk10199;
	typedef DWORD(__fastcall* TD2GetTextWidthFileNo)(wchar_t* str, DWORD* width, DWORD* fileno);
	static TD2GetTextWidthFileNo D2GetTextWidthFileNo;
};